<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>物品管理</title>
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/theme.css">
<link rel="stylesheet"
	href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
	type="text/javascript"></script>

</head>

<body class="content1">
	<div class="header">
		<h1 class="page-title">物品管理</h1>
	</div>
	<ul class="breadcrumb">
		<li><a href="<%=basePath%>showindex" target="_parent">Home</a> <span class="divider">/</span>
		</li>
		<li class="active">物品列表</li>
	</ul>
	<div class="container-fluid">
		<div class="row-fluid">


			<form class="form-inline" method="post"
				action="<%=basePath%>product/showsearch">
				<input class="input-xlarge" name="searchname" type="text"> <input
					class="btn icon-search" type="submit" value="查询" /> <a
					class="btn btn-primary" href="<%=basePath%>product/showadd"> 新增
				</a>

			</form>

			<div class="well">
				<table class="table">
					<c:forEach items="${products}" var="item">
					<tr><td> </td></tr>
						<tr>
							<td>id</td>
							<td colspan="5">${item.id }</td>
							</tr><tr>
							<td>saveurl</td>
							<td colspan="5">${item.saveurl }</td>
						</tr>
						<tr>
							<td colspan="3"><img alt="图片${item.name }"
								src="<%=basePath%>${item.saveurl }"
								style="height: 50px; width: 50px;"></td>
							<td>名称</td>
							<td><span style="color:red">${item.name }</span></td>
							<td>状态</td>
							<td><c:choose>
									<c:when test="${item.state==1}">
									显示		
									</c:when>
									<c:otherwise><span style="color:red">不显示</span></c:otherwise>
								</c:choose></td>
							<td>价格</td>
							<td><span style="color:red">${item.price }</span></td>
							<td>数量</td>
							<td><span style="color:red">${item.number }</span></td>
						</tr>
						
						<tr>
						<td>简介</td>
						<td colspan="8"><span style="color:blue">${item.shortmessage }</span></td>
						<td><a href="<%=basePath %>product/setinstate?theid=${item.id}">显示</a></td>
						<td><a href="<%=basePath %>product/setoutstate?theid=${item.id}">不显示</a></td>
						</tr>
						<tr>
						<td>详细信息</td>
						<td colspan="8"><span style="color:blue">${item.discribe }</span></td>
						<td><a href="<%=basePath %>product/showedit?theid=${item.id}">修改</a></td>
						</tr>

					</c:forEach>


				</table>


			</div>



		</div>
	</div>
	</div>
</body>
</html>
